From d7417580b72f9e3971c86085dd806834093952e5 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 26 Sep 2013 14:09:35 -0400 Subject: [PATCH] broadway: Don't bother memdup-ing If we're going to run off the end due to an invalid message, we're going to run off the end. We'll protect this by doing proper bounds checking in the future, but the malloc gives us nothing for now. --- gdk/broadway/broadway-server.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c index 0c56610d5f..b246f7152a 100644 --- a/gdk/broadway/broadway-server.c +++ b/gdk/broadway/broadway-server.c @@ -568,9 +568,7 @@ parse_input (BroadwayInput *input) } else { - char *terminated = g_memdup ((char *)data, payload_len); - parse_input_message (input, terminated); - g_free (terminated); + parse_input_message (input, data); } break; case BROADWAY_WS_CNX_PING: -- 2.30.2